-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Vyper support to Sourcify #1784
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think we should merge this by a merge commit in order to keep the individual commits |
@manuelwedler can you fix the conflicts here? |
yes will do so now |
…new endpoint `/verify/vyper` in server (#1760) * add VyperCheckedContract * rename CheckedContract.solidity to sources * refactor checkedcontract into an abstract class * refactor AbstractCheckedContract in server * use AbstractCheckedContract type in StorageServices * add /verify/vyper endpoint * successfully store is database and repository vyper match * dynamically download the vyper compiler * fix lib-sourcify-tests * enable all tests in server * improve comments for IVyperCompiler * fix pr suggestions * rename checkFiles to CheckFilesWithMetadata * rename useCompiler to useSolidityCompiler * fix pr suggestions
Finalize vyper api: openapi spec + error handling
* Only log Vyper downloaded on success * add architecture checks for vyper compiler on mac and improve logging
* Add lib-sourcify tests for Vyper support * Add server tests for Vyper support
…kedContract (#1783) * Add support for Vyper cbor auxdata in bytecode-utils and consequently in VyperCheckedContract * handle vyper incorrect semver versions, support auxdata position also for versions < 0.3.10 * Refactor Solidity and Vyper contract handling to improve auxdata extraction - Changed `auxdataStyle` in `SolidityCheckedContract` to be a static readonly property. - Updated bytecode decoding in both `SolidityCheckedContract` and `VyperCheckedContract` to use the static `auxdataStyle`. - Simplified `generateCborAuxdataPositions` method in `VyperCheckedContract` by introducing a helper function for auxdata position generation. - Added comments to clarify the use of `AuxdataStyle.SOLIDITY` for bytecode decoding in `ChainMonitor` and session state handlers. - Ensured that `generateCborAuxdataPositions` is called when necessary in `AbstractDatabaseService` to maintain data integrity. * add comment to explain `generateCborAuxdataPositions` return conditions * Refactor bytecode decoding to enhance auxdata handling for Vyper versions. Updated the `decode` function to support various auxdata styles, including specific handling for Vyper versions < 0.3.10 and < 0.3.5. Improved error messages for missing auxdata in bytecode. Updated tests to reflect changes in auxdata style usage. * Refactor bytecode decoding to replace `compiler` with `vyperVersion` in Vyper-related types and tests.
* Add Vyper documentation in READMEs * improve lib-sourcify readme * improve lib-sourcify readme * improve lib-sourcify documentation * fix version type in docs
* Add support for immutables * Remove exclusive test execution for Vyper in verification.spec.ts * future-proof getImmutableReferences * - Introduced `auxdataStyle` as an abstract property in `AbstractCheckedContract` - Updated bytecode decoding methods to utilize instance-specific `auxdataStyle` instead of static references. - Enhanced `ImmutablesTransformation` to accept dynamic transformation types: replace and insert. - Adjusted tests to reflect changes in auxdata handling and transformation types.
Don't store full source content in mocked metadata object
* Add database tests for Vyper contract auxdata * Add database test for Vyper constructor arguments and immutables transformations * Add verify endpoint test for auxdata transformation with wrong integrity hash * Add verify endpoint tests for auxdata transformation with wrong vyper version * Add lib-sourcify test for auxdata transformation
* Updated the Etherscan verification handler to process Vyper contracts alongside Solidity contracts * Refactor common functions, use correct typing, and fix errors * Add tests * handle "*" cases in etherscan vyper json input type --------- Co-authored-by: Marco Castignoli <[email protected]>
manuelwedler
force-pushed
the
vyper-verification-main
branch
from
January 2, 2025 14:53
619dcc7
to
3824d70
Compare
manuelwedler
approved these changes
Jan 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds vyper support, here the initial PR: #1760. Below the related tasks:
Create a common folder for the compilers code used by both lib-sourcify and server (idk if it fits in this new feature, imo yes because it's a lot of duplicated code now that we have also vyper stuff)postponed/verify/vyper
API errors + openapi responses: Finalize vyper API: OpenAPI spec + error handling #1774After merging: